package s02;

import net.sf.cglib.proxy.MethodProxy;

import java.lang.reflect.Method;

/**
 * @author wangpp
 */
public interface SampleAdvice {
    default public Object before(Object obj, Method method, Object[] args, MethodProxy proxy) {
        return null;
    }

    default public Object after(Object obj, Method method, Object[] args, MethodProxy proxy, Object result) {
        return result;
    }

    default public Object error(Object obj, Method method, Object[] args, MethodProxy proxy, Throwable e) {
        return null;
    }

    default public Object finallyHandle(Object obj, Method method, Object[] args, MethodProxy proxy, Object result) {
        return result;
    }
}
